package com.lc.demo.mapper;

import com.lc.demo.bean.Classgrade;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @Author: sakila
 * @Date: 2022/03/27/16:10
 * @Description:
 */
@Mapper
public interface ClassGradeMapper {


    @Select("select classname from  classgrade where id=#{classid}")
    String getClassNameById(@Param("classid") Integer classid);

    @Insert("insert into classgrade (classname) values (#{classname})")
    void addClass(Classgrade classgrade);

    @Update("update classgrade set classname=#{classname} where id=#{id}")
    void updateClass(Classgrade classgrade);

    @Select("select * from  classgrade")
    List<Classgrade> getClassList();
}
